package vn.edu.saigontech.ncms.service;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import vn.edu.saigontech.ncms.model.info.OfferingMember;
import vn.edu.saigontech.ncms.model.program.Program;
import vn.edu.saigontech.ncms.service.impl.OfferingMemberServiceImpl;
import vn.edu.saigontech.ncms.vo.CertificateReportItem;
import vn.edu.saigontech.ncms.vo.FinalTestResultReportItem;

public interface OfferingMemberService extends GenericService<OfferingMember, Long> {

	static final OfferingMemberService INSTANCE = new OfferingMemberServiceImpl();

	OfferingMember add(Long offeringReceiptId);

	OfferingMember edit(Long id, boolean active, String comment);

	Collection<OfferingMember> findByOfferingId(Long offeringId);

	Collection<OfferingMember> findByOfferingId(Long offeringId, boolean active);

	Collection<OfferingMember> findPassedByOfferingId(Long offeringId);

	Collection<OfferingMember> findOldPassedByOfferingId(Long offeringId);

	void changeOffering(Long sourceOfferingId, Long targetOfferingId,
			boolean sourceOfferingDeleted);
	
	Collection<CertificateReportItem> issueCertificate(Long offeringId);

	Collection<CertificateReportItem> issueOldCertificate(Long offeringId);

	Collection<FinalTestResultReportItem> reportFinalTestResult(Long offeringId);

	Collection<OfferingMember> findByDate(Date fromDate, Date toDate);
	
	List<OfferingMember> findByDateAndProgram(Date fromDate, Date toDate, Program program);

	Collection<OfferingMember> findByBirthDay(int month);
	
	Collection<OfferingMember> findByBirthDayAndProgram(int month, long programId);

	Collection<OfferingMember> findByEndDate(Date startDateOfMonth, Date endDateOfMonth);
	
	Collection<OfferingMember> findAbsenceByEndDate(Long programId, Date startDateOfMonth, Date endDateOfMonth, boolean active);
	
	Collection<OfferingMember> findAbsenceByMonthYear(int monthMonth, int year, boolean active);
}